from page.base_page2 import BasePage
from selenium.webdriver.common.by import By

"""首页类"""
class IndexPage(BasePage):

    url="/crm5/index.php?m=dynamic&a=index"

    """定位器"""
    #线索
    clue_locator = (By.LINK_TEXT, '线索')
    #客户
    custom_locator = (By.LINK_TEXT, '客户')
    #商机
    business_locator = (By.LINK_TEXT, '商机')

    def click_clue(self):
        """点击线索"""
        self.driver.find_element(*self.clue_locator).click()

    def click_custom(self):
        """点击客户"""
        self.driver.find_element(*self.custom_locator).click()

    def click_business(self):
        """点击商机"""
        self.driver.find_element(*self.business_locator).click()